package com.chinasofti.collection;

import java.util.Arrays;

public class Demo02 {
    public static void main(String[] args) {
        //定义一个字符串
        String s = "91 27 46 38 50";
        String[] strArray = s.split(" ");
        //for(int i = 0 ; i <strArray.length ; i++){
        //    System.out.println(strArray[i]);
        //}
        int[] arr = new int [strArray.length];
        for (int i = 0 ; i <strArray.length ; i++ ){
            arr[i] = Integer.parseInt(strArray[i]);
        }
        Arrays.sort(arr);
        for (int i = 0 ; i <arr.length ; i++ ){
            System.out.print(arr[i]+ "\t");
        }
    }
}
